home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / pascal / execswap.zip / TEST.PAS < prev   
Pascal/Delphi Source File  |  1989-05-02  |  527b  |  20 lines

  1. program TestExecSwap;
  2. uses
  3.   Dos,ExecSwap; {Keep ExecSwap last}
  4. const
  5.   SwapLoc : array[Boolean] of String[7] = ('on disk', 'in EMS');
  6. var
  7.   Status : Word;
  8. begin
  9.   UseEmsIfAvailable := True;
  10.   if not InitExecSwap(HeapPtr, 'SWAP.$$$') then
  11.     WriteLn('Unable to allocate swap space')
  12.   else begin
  13.     WriteLn('Allocated ', BytesSwapped, ' bytes ', SwapLoc[EmsAllocated]);
  14.     SwapVectors;
  15.     Status := ExecWithSwap(GetEnv('COMSPEC'), '');
  16.     SwapVectors;
  17.     WriteLn('Exec status: ', Status);
  18.   end;
  19. end.
  20.